![]() |
PATH![]() |
![]() ![]() |
The Appearance Manager declares the type for an application-defined menu item drawing function as follows:
typedef pascal (void, MenuItemDrawingProcPtr)(
const Rect *inBounds,
SInt16 inDepth,
Boolean inIsColorDevice,
SInt32 inUserData);
The Appearance Manager defines the data type MenuItemDrawingUPP to identify the universal procedure pointer for an application-defined menu item drawing function:
typedef UniversalProcPtr MenuItemDrawingUPP;
You typically use the NewMenuItemDrawingProc macro like this:
MenuItemDrawingUPP myMenuItemDrawingUPP;
myMenuItemDrawingUPP = NewMenuItemDrawingProc(MyMenuItemDrawingProc);
You typically use the CallMenuItemDrawingProc macro like this:
CallMenuItemDrawingProc(myMenuItemDrawingUPP, inBounds, inDepth,
inIsColorDevice, inUserData);
See MyMenuItemDrawingProc for a discussion of how to declare a menu item drawing function.